import initialize from './initialize.js'
import task from './task.js'
import center from './center.js'
import shoot from './shoot.js'
import album from './album.js'
import space from './space.js'
import taskDetail from './taskDetail.js'
import shootDetail from './shootDetail.js'
import albumDetail from './albumDetail.js'
import spaceDetail from './spaceDetail.js'
import homeUser from './homeUser.js'
import followUser from './followUser.js'
import beansRecord from './beansRecord.js'
import golds from './golds.js'
import thumbs from './thumbs.js'
import invite from './invite.js'
import applyMessage from './applyMessage.js'
import acceptMessage from './acceptMessage.js'
import applySign from './applySign.js'
import acceptSign from './acceptSign.js'
import fans from './fans.js'
import applyDetail from './applyDetail.js'
import shopSignDetail from './shopSignDetail.js'
import modelSignDetail from './modelSignDetail.js'
const json = {
	initialize,
	task,
	center,
	shoot,
	album,
	space,
	taskDetail,
	shootDetail,
	albumDetail,
	spaceDetail,
	homeUser,
	followUser,
	beansRecord,
	golds,
	invite,
	applyMessage,
	acceptMessage,
	applySign,
	acceptSign,
	fans,
	applyDetail,
	shopSignDetail,
	modelSignDetail,
	thumbs
}

export default (name, loading = true) => {
	if(loading) {
		uni.showLoading()
	}
	
	return new Promise(resolve => {
		setTimeout(() => {
			uni.hideLoading()
			resolve(json[name])
		}, 500)
	})
}